<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>查看用户页面</title>

<!-- Bootstrap -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">

<!-- Google Font -->
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" rel="stylesheet">

<!-- Template style -->
<link rel="stylesheet" href="dist/css/style.css">
<link rel="stylesheet" href="app/et-line-font/et-line-font.css">
<link rel="stylesheet" href="app/font-awesome/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet" href="dist/weather/weather-icons.min.css">
<link type="text/css" rel="stylesheet" href="dist/weather/weather-icons-wind.min.css">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

<script src="plugins/charts/code/highcharts.js"></script>
</head>

<body class="sidebar-mini">
<div class="wrapper">

  <!-- 引入顶栏 -->
  <header class="main-header dark-bg">

    <!-- Logo -->
    <a href="index.html" class="logo dark-bg">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><img src="dist/img/logo.png" alt="Ovio"></span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><img src="dist/img/logo-lg.png" alt="Ovio"></span> </a>

    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top" role="navigation">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"> <span class="sr-only">Toggle navigation</span> </a>



      <!--右侧顶栏，以后要统一，以index页面的为准-->
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">


          <!--邮箱登录-->
          <li class="dropdown notifications-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="icon-envelope"></i>
            <div class="notify"> <span class="heartbit noticePoint"></span> <span class="point noticePoint"></span> </div>
          </a>
            <ul class="dropdown-menu">
              <li class="header" style="text-align: center"><span>请输入您的邮箱和授权码</span><br/>
                <span>--（目前仅支持QQ邮箱）--</span></li>
              <li>
                <input type="text" name="search" class="form-control" id="emailLogin" disabled="disabled" style="text-align: center;margin-top: 5%">
                <input type="text" name="search" class="form-control" id="password" placeholder="--请输入授权码--" style="text-align: center;margin-top: 5%">
              </li>
              <li class="footer" style="text-align: center;margin-top: 5%"><button type="button" class="btn btn-primary btn-outline btn-rounded" id="emailLoginButton">登录</button></li>
            </ul>
          </li>


          <!--收信箱-->
          <li class="dropdown messages-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="icon-megaphone"></i>
            <div class="notify"> <span class="heartbit noticePoint"></span> <span class="point noticePoint"></span> </div>
          </a>
            <ul class="dropdown-menu">
              <li class="header" style="padding-bottom: 10%">
                <div>您有<span id="emailNum">0</span>条邮件未读（目前不支持实时的收件箱显示，期待后续更新...）</div>
              </li>
              <li>
                <ul class="menu" id="emailList">
                  <!--<li><a href="#">-->
                  <!--<div class="pull-left"><img src="dist/img/img1.jpg" class="img-circle" alt="User Image"></div>-->
                  <!--<h4>Florence Douglas</h4>-->
                  <!--<p>Lorem ipsum dolor sit amet.</p>-->
                  <!--<p><small><i class="fa fa-clock-o"></i> 2 mins</small></p>-->
                  <!--</a></li>-->
                  <!--<li><a href="#">-->
                  <!--<div class="pull-left"><img src="dist/img/img2.jpg" class="img-circle" alt="User Image"></div>-->
                  <!--<h4>Douglas Smith</h4>-->
                  <!--<p>Lorem ipsum dolor sit amet.</p>-->
                  <!--<p><small><i class="fa fa-clock-o"></i> 15 mins</small></p>-->
                  <!--</a></li>-->
                  <!--<li><a href="#">-->
                  <!--<div class="pull-left"><img src="dist/img/img3.jpg" class="img-circle" alt="User Image"></div>-->
                  <!--<h4>Lorence Deo</h4>-->
                  <!--<p>Lorem ipsum dolor sit amet.</p>-->
                  <!--<p><small><i class="fa fa-clock-o"></i> 35 mins</small></p>-->
                  <!--</a></li>-->
                  <!--<li><a href="#">-->
                  <!--<div class="pull-left"><img src="dist/img/img1.jpg" class="img-circle" alt="User Image"></div>-->
                  <!--<h4>Florence Douglas</h4>-->
                  <!--<p>Lorem ipsum dolor sit amet.</p>-->
                  <!--<p><small><i class="fa fa-clock-o"></i> 2 mins</small></p>-->
                  <!--</a></li>-->
                </ul>
              </li>
              <li class="footer" style="text-align: center;padding-top: 10%">
                <button disabled="disabled" id="writeEmail" type="button" id="writeEmail" class="btn btn-default btn-outline" style="margin-right: 10%">写邮件</button>
                <button disabled="disabled" id="enterEmail" type="button" class="btn btn-default btn-outline">进入邮箱</button>
              </li>
            </ul>
          </li>

          <!--右侧头像框-->
          <li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <img src="dist/img/img1.jpg" class="user-image" alt="User Image"> <span class="hidden-xs"><span class="adminName">Florence Douglas</span></span> </a>
            <ul class="dropdown-menu">
              <li class="user-header">
                <div class="pull-left user-img"><img src="dist/img/img1.jpg" class="img-responsive" alt="User"></div>
                <p class="text-left"> <span class="adminName">Florence Douglas</span> <small id="email">florence@gmail.com</small> </p>
                <div class="view-link text-left"><a href="#">个人信息</a> </div>
              </li>
              <li><a href="#"><i class="icon-gears"></i> 账号设置</a></li>
              <li role="separator" class="divider"></li>
              <li><a href="adminOut"><i class="fa fa-power-off"></i> <span id="adminOut">退出登录</span></a></li>
            </ul>
          </li>
        </ul>
      </div>
    </nav>
  </header>

  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar dark-bg">
    <section class="sidebar">
      <div class="user-panel black-bg">
        <div class="pull-left image"> <img src="dist/img/img1.jpg" class="img-circle" alt="User Image"> </div>
        <div class="pull-left info">
          <p class="adminName"></p>
          <a href="#"><i class="fa fa-circle"></i> Online</a> </div>
      </div>
      <!-- Sidebar Menu -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="header dark-bg">Menu</li>
        <li class="treeview"><a href="#"><i class="fa fa-dashboard"></i> <span>数据详情</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
          <ul class="treeview-menu ">
            <li><a href="index.html"><i class="fa fa-angle-right"></i> 后台数据概览</a></li>
            <li><a href="getMoreTodayFund.html"><i class="fa fa-angle-right"></i> 数据详情 2</a></li>
            <li><a href="dashboard-3.html"><i class="fa fa-angle-right"></i> 数据详情 3</a></li>
          </ul>
        </li>
        <li class="treeview"> <a href="#"><i class="fa fa-table"></i> <span>权限管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
          <ul class="treeview-menu">
            <li><a href="userManage.html"><i class="fa fa-angle-right"></i> 用户管理</a></li>
            <li><a href="adminManage.html"><i class="fa fa-angle-right"></i> 管理员管理</a></li>
            <li><a href="goodManage.html"><i class="fa fa-angle-right"></i> 商品管理</a></li>
          </ul>
        </li>
        <li class="treeview"> <a href="#"><i class="fa fa-bar-chart"></i> <span>业务管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
          <ul class="treeview-menu">
            <li><a href="charts/line.html"><i class="fa fa-angle-right"></i> 资质维护</a></li>
            <li><a href="charts/area.html"><i class="fa fa-angle-right"></i> 分类管理</a></li>
            <li><a href="charts/bar.html"><i class="fa fa-angle-right"></i> 流程管理</a></li>
            <li><a href="charts/pie.html"><i class="fa fa-angle-right"></i> 广告管理</a></li>
            <li><a href="charts/bubble.html"><i class="fa fa-angle-right"></i> 消息模板</a></li>
            <li><a href="charts/combinations.html"><i class="fa fa-angle-right"></i> 项目分类</a></li>
            <li><a href="charts/3d.html"><i class="fa fa-angle-right"></i> 项目标签</a></li>
          </ul>
        </li>
        <li class="treeview"> <a href="#"><i class="fa fa-files-o"></i> <span>业务审核</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
          <ul class="treeview-menu">
            <li><a href="pages/login.html"><i class="fa fa-angle-right"></i> 实名认证审核</a></li>
            <li><a href="register.html"><i class="fa fa-angle-right"></i> 广告审核</a></li>
            <li><a href="forgotPassword.html"><i class="fa fa-angle-right"></i> 众筹审核</a></li>
          </ul>
        </li>
      </ul>
      <!-- sidebar-menu -->
    </section>
  </aside>
  
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper"> 
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>查看用户</h1>
      <ol class="breadcrumb">
        <li><a href="index.html"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active"><i class="fa fa-bullseye"></i> 用户管理</li>
        <li class="active"><i class="fa fa-credit-card"></i> 查看用户</li>
      </ol>
    </section>
    
    <!-- Main content -->
    <section class="content container-fluid">
      <div class="row">
        <div class="col-lg-12">
          <div class="chart-box">
            <div class="m-bot-3 over-hidden">
              <h2 class="pull-left">姓名：<span id="userName">陈雄</span></h2>
              <!-- Split button -->
              <div class="btn-group pull-right">
                <button type="button" class="btn btn-danger">操作用户</button>
                <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button>
                <ul class="dropdown-menu dropdown-menu-right">
                  <li><a href="#"><i class="fa fa-plus"></i>用户项目管理</a></li>
                  <!--<li><a href="#"><i class="fa fa-ban"></i>撤销名下项目</a></li>-->
                  <li><a href="userUpdate.html" id="userUpdate"><i class="fa fa-print"></i>修改用户信息</a></li>
                  <li><a href="#" onclick="deleteUser()"><i class="fa fa-trash-o"></i>删除用户</a></li>
                  <!--<li><a href="#"><i class="fa fa-save"></i>Save Invoice</a></li>-->
                  <!--<li><a href="#"><i class="fa fa-credit-card"></i>Paid Invoice</a></li>-->
                </ul>
              </div>
            </div>
            <div class="row" style="font-size: 150%">
              <div class="col-md-6 col-xs-6 m-t-10">
                <ul class="list-unstyled m-bot-3">
                  <li style="margin-bottom: 2%">账号: <span class="text-semibold" id="userAccount">April 15, 2017</span></li>
                  <li style="margin-bottom: 2%">密码: <span class="text-semibold" id="userPassword">April 15, 2017</span></li>
                  <li style="margin-bottom: 2%">身份证: <span class="text-semibold" id="userIdNumber">April 15, 2017</span></li>
                  <li>注册日期: <span class="text-semibold" id="userCreateTime">April 15, 2017</span></li>
                </ul>
                <h4>发布众筹项目：</h4>
                <ul class="list-unstyled m-bot-3">
                  <li style="float: left;margin-right: 3%;margin-bottom: 3%">
                    <button class="btn btn-default" type="button" data-toggle="collapse" data-target="#collapseExample1" aria-expanded="false" aria-controls="collapseExample"> Button with data-target </button>
                    <div class="collapse" id="collapseExample1">
                      <div class="well">
                        <h4>Duis sagittis ipsum</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                      </div>
                    </div>
                  </li>
                  <li style="float: left;margin-right: 3%;margin-bottom: 3%">
                    <button class="btn btn-default" type="button" data-toggle="collapse" data-target="#collapseExample2" aria-expanded="false" aria-controls="collapseExample"> Button with data-target </button>
                    <div class="collapse" id="collapseExample2">
                      <div class="well">
                        <h4>Duis sagittis ipsum</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                      </div>
                    </div>
                  </li>
                  <li style="float: left;margin-right: 3%;margin-bottom: 3%">
                    <button class="btn btn-default" type="button" data-toggle="collapse" data-target="#collapseExample3" aria-expanded="false" aria-controls="collapseExample"> Button with data-target </button>
                    <div class="collapse" id="collapseExample3">
                      <div class="well">
                        <h4>Duis sagittis ipsum</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                      </div>
                    </div>
                  </li>
                  <li style="float: left;margin-right: 3%;margin-bottom: 3%">
                    <button class="btn btn-default" type="button" data-toggle="collapse" data-target="#collapseExample4" aria-expanded="false" aria-controls="collapseExample"> Button with data-target </button>
                    <div class="collapse" id="collapseExample4">
                      <div class="well">
                        <h4>Duis sagittis ipsum</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                      </div>
                    </div>
                  </li>
                  <li style="float: left;margin-right: 3%;margin-bottom: 3%">
                    <button class="btn btn-default" type="button" data-toggle="collapse" data-target="#collapseExample5" aria-expanded="false" aria-controls="collapseExample"> Button with data-target </button>
                    <div class="collapse" id="collapseExample5">
                      <div class="well">
                        <h4>Duis sagittis ipsum</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper </p>
                      </div>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="col-md-6 text-right">
               <div class="col-md-3 pull-right m-bot-2 text-right"><img src="dist/img/img1.jpg" class="img-circle img-responsive" alt="User Image"></div>
              <div class="col-md-12">
                <ul class="px-0 list-unstyled">
                  <li>该用户所有项目获得筹金</li>
                  <li class="lead text-bold-800">￥ <span id="sumMoney">1200</span></li>
                  <li id="isExamine" style="margin-top: 10%">
                    <!--<h4>身份审核状态：</h4>-->
                    <!--<a href="#">未审核</a></address>-->
                    <!--<a href="#">已审核</a></address>-->
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        
          <div class="col-lg-12">
          <div class="chart-box">
            <h4>项目获筹明细</h4>
            <div class="table-block">
              
              <div class="table-responsive">
                <table class="table table-responsive">
                  <thead>
                    <tr>
                      <th width="4%" style="text-align: center">No.</th>
                      <th width="53%">项目名称</th>
                      <th width="15%" class="text-right" style="text-align: center">当天获得筹金</th>
                      <th width="14%" class="text-right" style="text-align: center">最近的时间</th>
                      <th width="14%" class="text-right" style="text-align: center">目前总筹金</th>
                    </tr>
                  </thead>
                  <tbody style="font-size: 150%">
                  <!--<tr>-->
                    <!--<td style="vertical-align: middle">1</td>-->
                    <!--<td>-->
                      <!--<div class="progress-info m-bot-1"><a href="#">CM牌洗衣机 </a><span class="pull-right" id="completion1">90%</span></div>-->
                      <!--<div class="progress">-->
                        <!--<div  id="completionBar1" class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:40%"><span class="sr-only">40% Complete</span></div>-->
                      <!--</div>-->
                    <!--</td>-->
                    <!--<td class="text-right" style="vertical-align: middle">￥<span id="recentGetMoney1">668</span></td>-->
                    <!--<td class="text-right" style="vertical-align: middle">2020-01-02</td>-->
                    <!--<td class="text-right" style="vertical-align: middle">￥<span id="totalAmount1">668</span></td>-->
                  <!--</tr>-->
                  </tbody>
                </table>
                <button type="button" class="btn btn-success pull-right" disabled="disabled">请点击项目名称进行数据测试...</button>
              </div>
            </div>
          </div>
        </div>
        
        
        
        </div>
      </div>
    </section>
    <!-- content --> 
  </div>
  <!-- content-wrapper --> 
  
  <!-- Main Footer -->
  <footer class="main-footer dark-bg">
    <div class="pull-right hidden-xs"> Version 1.0</div>
    Copyright &copy; 2017 Yourdomian. All rights reserved. </footer>
</div>
<!-- wrapper --> 

<!-- jQuery --> 
<script src="dist/js/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="dist/js/ovio.js"></script>

<!--charts--> 
<script src="plugins/charts/code/modules/exporting.js"></script>
<script src="dist/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="adminCommon.js"></script>
<script type="text/javascript">
    $(function () {

        var search = window.location.search;
        var uriParam = decodeURI(search.toString().substring(1));
        var primaryKey=uriParam.split("=")[1];

        // 修改用户信息的链接
        $("#userUpdate").prop("href","userUpdate.html?primaryKey="+primaryKey)

        // 获取用户信息
        $.post("getUserDetail",{"primaryKey":primaryKey},function (resultEntity) {
            if (resultEntity.resultFlag==true){
                $("#userName").text(resultEntity.data.username);
                $("#userAccount").text(resultEntity.data.useraccount);
                $("#userPassword").text(resultEntity.data.userpassword);
                $("#userIdNumber").text(resultEntity.data.idnumber);
                $("#userCreateTime").text(resultEntity.data.createtime);
                if (resultEntity.data.examine==0){
                    $("#isExamine").html("<h4>身份审核状态：</h4>\n" +
                        "                    <a href=\"userExamine.html?primaryKey="+primaryKey+"\">未审核，请点击进入审核页面</a></address>\n");
                }

            } else {
                layer.msg("用户信息获取失败");
            }
        });


        // 获取该用户拥有的项目信息
        $.post("getUserGoods",{"primaryKey":primaryKey},function (resultEntity) {
            if (resultEntity.resultFlag==true){
                var tbody="";
                var goodId = new Array();
                if (resultEntity.data!=null){
                  var length = resultEntity.data.length;
                  var completionPercent=0;
                  var sumMoney=0;
                  for (var i = 0; i <length ; i++) {
                      // 把项目的id先封装进一个数组
                      goodId.push(JSON.stringify(resultEntity.data[i].id))

                      completionPercent=Math.floor(Number(resultEntity.data[i].currentamount)/Number(resultEntity.data[i].targetamount)*100);
                      sumMoney+=Number(resultEntity.data[i].currentamount);
                      tbody+="<tr>\n" +
                          "                    <td style=\"vertical-align: middle;text-align: center\">"+(i+1)+"</td>\n" +
                          "                    <td>\n" +
                          "                      <div class=\"progress-info m-bot-1\"><a href=\"goodDetail.html?primaryKey="+resultEntity.data[i].id+"\">"+resultEntity.data[i].goodname+" </a><span class=\"pull-right\" id=\"completion"+(i+1)+"\">"+completionPercent+"%</span></div>\n" +
                          "                      <div class=\"progress\">\n" +
                          "                        <div  id=\"completionBar"+(i+1)+"\" class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:"+completionPercent+"%\"><span class=\"sr-only\">"+completionPercent+"% Complete</span></div>\n" +
                          "                      </div>\n" +
                          "                    </td>\n" +
                          "                    <td class=\"text-right\" style=\"vertical-align: middle;text-align: center\">￥<span id=\""+resultEntity.data[i].id+"-recentGetMoney\">---</span></td>\n" +
                          "                    <td class=\"text-right\" style=\"vertical-align: middle;text-align: center\" id=\""+resultEntity.data[i].id+"-recentDate\">近期无人捐款</td>\n" +
                          "                    <td class=\"text-right\" style=\"vertical-align: middle;text-align: center\">￥<span id=\"totalAmount"+(i+1)+"\">"+resultEntity.data[i].currentamount+"</span></td>\n" +
                          "                  </tr>";
                  }
                  $("#sumMoney").text(sumMoney);
                }else{
                    tbody+=" <tr>\n" +
                        "                    <td style=\"vertical-align: middle;text-align: center\">-</td>\n" +
                        "                    <td>\n" +
                        "                      <div class=\"progress-info m-bot-1\"><a href=\"#\">该用户无项目在众筹 </a><span class=\"pull-right\" id=\"completion1\">0%</span></div>\n" +
                        "                      <div class=\"progress\">\n" +
                        "                        <div  id=\"completionBar1\" class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuenow=\"40\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:0%\"><span class=\"sr-only\">40% Complete</span></div>\n" +
                        "                      </div>\n" +
                        "                    </td>\n" +
                        "                    <td class=\"text-right\" style=\"vertical-align: middle;text-align: center\">￥<span id=\"recentGetMoney1\">---</span></td>\n" +
                        "                    <td class=\"text-right\" style=\"vertical-align: middle;text-align: center\">---</td>\n" +
                        "                    <td class=\"text-right\" style=\"vertical-align: middle;text-align: center\">￥<span id=\"totalAmount1\">---</span></td>\n" +
                        "                  </tr>";
                    $("#sumMoney").text(0);
                }
                $("tbody").html(tbody);


                // 补全这些项目的最近获筹数据
                $.post("getTheseGoodRedisInfo",{"goodId":goodId.toString()},function (resultEntity) {
                    if (resultEntity.resultFlag == true) {

                        // {"1":{"2020-12-24":31},"2":{"2021-01-03":10000}}
                        var json = JSON.stringify(resultEntity.data);
                        var jsonArray=json.substring(1,json.length-1).split(",");
                        var length1 = jsonArray.length;
                        var goodId="";
                        var goodDateAndMoney=null;
                        var goodDate="";
                        var goodMoney="";
                        for (var i = 0; i <length1 ; i++) {
                            // 获取存在近期有捐款的商品的捐款信息
                            var idAndDate = jsonArray[i].split(":");
                            goodId=idAndDate[0];
                            goodId=goodId.substring(1,goodId.length-1);
                            goodDate=idAndDate[1].substring(2,idAndDate[1].length-1);
                            goodMoney=idAndDate[2].substring(0,idAndDate[2].length-1);
                            $("#"+goodId+"-recentGetMoney").text(goodMoney);
                            $("#"+goodId+"-recentDate").text(goodDate);
                        }


                    }else {
                        layer.msg("项目最近获筹信息获取失败，请刷新页面...")
                    }
                });
            } else {
                layer.msg("该用户项目信息获取失败");
            }
        });


    })


    // 删除用户
    function deleteUser(){
        var search = window.location.search;
        var uriParam = decodeURI(search.toString().substring(1));
        var primaryKey=uriParam.split("=")[1];

        layer.confirm("您确定要删除该用户？", {
            btn: ["是","否"] //按钮
        }, function() {
           $.post("deleteUser",{"primaryKey":primaryKey},function (resultEntity) {
               if (resultEntity.resultFlag==true){
                   layer.msg("删除成功，3秒后跳转到用户管理页面...");
                   setTimeout("window.location.replace(\"userManage.html\")",3000);
               } else {
                   layer.msg("删除失败，请重试...");
               }
           });


        },function () {});
    }
</script>

</body>
</html>